package cc.laop.java.serviceLoader;

import org.junit.Test;

import java.util.ServiceLoader;

public class ServiceLoaderTest {

    @Test
    public void loader() {
        ServiceLoader<Message> loader = ServiceLoader.load(Message.class);

        for (Message msg : loader) {
            System.out.println(msg.recive());
        }
    }

}
